import { Component } from 'react'


export default class Footer extends Component{

  render() {
    const { selectCount, isSelectAll,messageLength,changeIsSelectedAll,removeSelected } = this.props
    return (
      <div className={` ${messageLength?'sum':'sum-null'}`} >
            <label>
            <input type="checkbox" checked={isSelectAll} onChange={({target}) => {
              changeIsSelectedAll(target.checked)
            } }/>
                <span>选中全部</span>
            </label>
          <div className="removeAll" onClick={() => {
            removeSelected()
            }}>删除选中项</div>
        <p>当前选中{ selectCount }项，共{ messageLength }条留言</p>
        </div>
    );
  }
}